/*
 * This file is used to build a configuration
 * of available functions.
 * You can choose one or more of the functions under main(void)
 */

//#include "../test/test_basic.h" //Simple Test configuration
//#include "../util/remote_control.h" //Remote Control for controlling the car via UART
//#include "../ai/basic_rounders.h" //Simple Wall following
#include "../ai/race.h"


/*
 * Initialization of sensors, motor, servos ans uart
 */
void init(void){
	init_uart();
	init_sensors();
	init_motion_control();
	put_uart("[INIT] proceeded");
	put_uart(CRLF);
}

/*
 * Main program loop
 */
int main(void){
	init();
	put_uart("[START] Programm");
	put_uart(CRLF);
	_delay_ms(1000);

	//test_all_sensor();
	//_delay_ms(3000);

	//test_servo_extern();

	while(1){
		//test_hello_world();
//		test_all_sensor(); //Runs fine
//		int i = 0;
//		for(i = 0; i < 100; i++){
//			test_ir(IR_1);
//		}
//		put_uart(CRLF);
//		_delay_ms(10000);
		//put_uart(CRLF);
		//test_motor();
		//remote_control_main();
		//main_basic_rounders();
		
		//print_all_Data();
		//test_servo();
		race();
//		_delay_ms(10000);
	}
	return 0;
}
